package com.richard.demo.controller;

import com.richard.demo.entity.StudentInfoEntity;
import com.richard.demo.service.StudentInfoService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@Slf4j
public class Login {

    @GetMapping("/login")
    public void enter(String stuId) {
        List<StudentInfoEntity> entityList = StudentInfoService.studentInfoService.getStudentInfo(stuId);
        for (StudentInfoEntity entity : entityList) {
            System.out.println(entity.getStuName());
        }
//        System.out.println(StudentInfoService.studentInfoService.updateStudentAGE(stuId));
        System.out.println(StudentInfoService.studentInfoService.deleteStudentInfo(stuId));



//        StudentInfoService.studentInfoService.insertStudentInfo("20225102090107", "贾其杨", "22人工智能技术应用1班");
    }
}

